<!DOCTYPE HTML PUBLIC "-//W3C//DTDHTML 4.0 Transitional//EN"> 
<html>
<head>
	<title>后台首页</title>
	<include file="Public:jsandcss" />
	<script type="text/javascript" src="/Public/js/uploadify/jquery.uploadify.min.js"></script>
	<link rel="Stylesheet" type="text/css" href="/Public/js/uploadify/uploadify.css" />
	<script type="text/javascript">
	$(function(){
		$('#fileUpload1').uploadify({
			'swf'      : '/Public/js/uploadify/uploadify.swf',
			'formData' : {'sort':1},
			'uploader' : '__URL__/bannerUpload',
			'buttonText' : '选择文件',
			'onUploadSuccess' : function(file, data, response) {
				if(response){
					$("#img1").val(data);
	            }else{
	            	alert(file.name + ' 上传失败');
	            }
	        }
		});
		
		$('#fileUpload2').uploadify({
			'swf'      : '/Public/js/uploadify/uploadify.swf',
			'formData' : {'sort':2},
			'uploader' : '__URL__/bannerUpload',
			'buttonText' : '选择文件',
			'onUploadSuccess' : function(file, data, response) {
				if(response){
					$("#img2").val(data);
				}else{
	            	alert(file.name + ' 上传失败');
	            }
	        }
		});
		
		$('#fileUpload3').uploadify({
			'swf'      : '/Public/js/uploadify/uploadify.swf',
			'formData' : {'sort':3},
			'uploader' : '__URL__/bannerUpload',
			'buttonText' : '选择文件',
			'onUploadSuccess' : function(file, data, response) {
				if(response){
					$("#img3").val(data);
				}else{
	            	alert(file.name + ' 上传失败');
	            }
	        }
		});
		
		$('#fileUpload4').uploadify({
			'swf'      : '/Public/js/uploadify/uploadify.swf',
			'formData' : {'sort':1},
			'uploader' : '__URL__/yhUpload',
			'buttonText' : '选择文件',
			'onUploadSuccess' : function(file, data, response) {
				if(response){
					$("#img4").val(data);
				}else{
	            	alert(file.name + ' 上传失败');
	            }
	        }
		});
		
		$('#fileUpload5').uploadify({
			'swf'      : '/Public/js/uploadify/uploadify.swf',
			'formData' : {'sort':2},
			'uploader' : '__URL__/yhUpload',
			'buttonText' : '选择文件',
			'onUploadSuccess' : function(file, data, response) {
				if(response){
					$("#img5").val(data);
				}else{
	            	alert(file.name + ' 上传失败');
	            }
	        }
		});
		
		$('#fileUpload6').uploadify({
			'swf'      : '/Public/js/uploadify/uploadify.swf',
			'uploader' : '__URL__/wkUpload',
			'buttonText' : '选择文件',
			'onUploadSuccess' : function(file, data, response) {
				if(response){
					$("#img6").val(data);
				}else{
	            	alert(file.name + ' 上传失败');
	            }
	        }
		});
	});
	</script>
	<style type="text/css">
	</style>
</head>

	<body>
		<include file="Public:header" />
		
		<h2>上面banner定制</h2>
		<form action="saveBannerUrl" method="post">
			<table width="100%" cellpadding="0" cellspacing="0" border="1">
				<tr>
					<td>图片1：</td>
					<td><input type="text" id="img1" value="{$banner1.imgUrl}" style="width:300px"/> <input type="text" id="fileUpload1"/></td>
					<td>链接1(http://开头)：</td>
					<td><input type="text" name="url1" value="{$banner1.clickUrl}" style="width:300px"/></td>
					<td>鼠标悬停文字：</td>
					<td><input type="text" name="text1" value="{$banner1.title}" style="width:300px"/></td>
				</tr>
				<tr>
					<td>图片2：</td>
					<td><input type="text" id="img2" value="{$banner2.imgUrl}" value="" style="width:300px"/> <input type="text" id="fileUpload2"/></td>
					<td>链接2(http://开头)：</td>
					<td><input type="text" name="url2" value="{$banner2.clickUrl}" style="width:300px"/></td>
					<td>鼠标悬停文字：</td>
					<td><input type="text" name="text2" value="{$banner2.title}" style="width:300px"/></td>
				</tr>
				<tr>
					<td>图片3：</td>
					<td><input type="text" id="img3" value="{$banner3.imgUrl}" value="" style="width:300px"/> <input type="text" id="fileUpload3"/></td>
					<td>链接3(http://开头)：</td>
					<td><input type="text" name="url3" value="{$banner3.clickUrl}" style="width:300px"/></td>
					<td>鼠标悬停文字：</td>
					<td><input type="text" name="text3" value="{$banner3.title}" style="width:300px"/></td>
				</tr>
				<tr>
					<td colspan="2">
						<input type="submit" value="保存"/>
					</td>
				</tr>
			</table>
		</form>
		<hr><br>
		<h2>优惠活动2张图</h2>
		<form action="saveYhUrl" method="post">
			<table width="100%" cellpadding="0" cellspacing="0" border="1">
				<tr>
					<td>缩略图1：</td>
					<td><input type="text" id="img4" value="{$yh1.imgUrl}" style="width:300px"/> <input type="text" id="fileUpload4"/></td>
					<td>链接1(http://开头)：</td>
					<td><input type="text" name="url1" value="{$yh1.clickUrl}" style="width:300px"/></td>
					<td>标题：</td>
					<td><input type="text" name="text1" value="{$yh1.title}" style="width:300px"/></td>
				</tr>
				<tr>
					<td>缩略图2：</td>
					<td><input type="text" id="img5" value="{$yh2.imgUrl}" value="" style="width:300px"/> <input type="text" id="fileUpload5"/></td>
					<td>链接2(http://开头)：</td>
					<td><input type="text" name="url2" value="{$yh2.clickUrl}" style="width:300px"/></td>
					<td>标题：</td>
					<td><input type="text" name="text2" value="{$yh2.title}" style="width:300px"/></td>
				</tr>
				<tr>
					<td colspan="2">
						<input type="submit" value="保存"/>
					</td>
				</tr>
			</table>
		</form>
		<hr><br>
		<h2>workshop一张大图</h2>
		<form action="saveWKUrl" method="post">
			<table width="100%" cellpadding="0" cellspacing="0" border="1">
				<tr>
					<td>图片：</td>
					<td><input type="text" id="img6" value="{$wk.imgUrl}" style="width:300px"/> <input type="text" id="fileUpload6"/></td>
					<td>链接1(http://开头)：</td>
					<td><input type="text" name="url" value="{$wk.clickUrl}" style="width:300px"/></td>
					<td>标题：</td>
					<td><input type="text" name="text" value="{$wk.title}" style="width:300px"/></td>
				</tr>
				<tr>
					<td colspan="2">
						<input type="submit" value="保存"/>
					</td>
				</tr>
			</table>
		</form>
	</body>
</html>
